@extends('manage._layout')
@section('page-cssjs')
    <style type="text/css">
        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
            padding: 8px;
            line-height: 1.42857143;
            vertical-align: middle;
            border-top: 1px solid #ddd;
            text-align: center;
        }
        td, th {
            padding: 0;
            text-align: center;
        }
    </style>
@stop

@section('page-title')
    <h3>菜单列表</h3>
@stop
@section('page-breadcrumbs')
    <li>
        <a href="{{route('menu_list')}}" title="">
            菜单管理
        </a>
    </li>
@stop
@section('page-buttons')
    <li>
        <a href="{{URL::route('menu_add')}}"    role="button"><i class="icon-plus-sign"></i>添加菜单</a>
    </li>
    <li>
        <a href="{{URL::route('role_list')}}"   role="button"><i class="icon-list"></i>角色管理</a>
    </li>
    <li>
        <a href="{{URL::route('user_list')}}"   role="button"><i class="icon-list"></i>用户管理</a>
    </li>
    <li>
        <a href="{{URL::route('first_menu_list')}}" role="button"><i class="icon-list"></i>一级菜单管理</a>
    </li>
@stop
@section('page-content')

    <table class="table table-striped">
        <thead>
        <tr>
            <th>排序</th>
            <th>菜单ID</th>
            <th>名称</th>
            <th>链接(路由别名)</th>
            <th>所属一级菜单</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @if (!empty($data))
        @foreach($data as $key=>$val)
        <tr>
            <td>{{$val->sort}}</td>
            <td>{{$val->id}}</td>
            <td>{{$val->name}}</td>
            <td style="max-width: 150px;">{{$val->url}}</td>
            <td>{{$val->first_menu_name}}</td>
            <td class="td-actions"> <a href="{{URL::route('menu_module_list',['id'=>$val->id])}}" class="btn btn-xs btn-primary" role="button"><span class="icon-zoom-in" aria-hidden="true"></span>菜单模块列表</a>
                &nbsp;&nbsp;<a href="{{URL::route('menu_edit',['id'=>$val->id])}}" class="btn btn-xs btn-info" role="button"><span class="icon-pencil" aria-hidden="true"></span>修改</a>
            </td>
        </tr>
        @endforeach
        @else
            <tr><td colspan="4">暂无数据</td></tr>
        @endif
        </tbody>
    </table>

@stop